package com.lx.controller;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.lx.beans.Student;
import com.lx.service.StudentService;

@Controller
@RequestMapping("stu")
public class StudentController {

	@Autowired
	private StudentService sService;

	@RequestMapping("list")
	public String list(Map<String, Object> map) {
		// 查询所有学生，
		List<Student> sList = sService.findAllStus();
		map.put("sList", sList);
		// 返回到模板页面
		return "list";
	}

}
